package DesignPattern.Builder.FactoryPattern.FactoryMethod;

import Utils.Util;

public class Client {
    public static void main(String[] args) {
        CoffeeStore store = new CoffeeStore();
        CoffeeFactory factory1 = new AmericanCoffeeFactory();
        store.setFactory(factory1);
        Coffee coffee = store.orderCoffee();

        System.out.println(coffee.getName());

        Util.divide();
        CoffeeFactory factory2 = new LatteCoffeeFactory();
        store.setFactory(factory2);
        coffee = store.orderCoffee();
        System.out.println(coffee.getName());

    }
}
